<!-- Action -->
<!-- Author: Edwin -->
<template>
  <div class=''>
    <el-button type="text"
               size="mini"
               @click.stop="openTimeEntryDialog">{{ i18nT('custom.workSchedule.edit') }}</el-button>
    <EditTimeEntryComponent :itemInfo="editItemData" />
  </div>
</template>

<script>
import i18n from '@/i18n'
import EditTimeEntryComponent from './edit-time-entry'

export default {
  components: { EditTimeEntryComponent },
  data () {
    return {
      addTemplateDialog: false,
      editItemData: null
    }
  },
  methods: {
    i18nT (key) {
      return i18n.t(key)
    },
    openTimeEntryDialog () {
      this.editItemData = this.$data.data
      this.addTemplateDialog = true
    },
    closeTimeEntryDialog () {
      this.editItemData = null
      this.addTemplateDialog = false
    }
  }
}
</script>

<style scoped>

</style>
